3.254 \(\int \frac{\csc ^2(e+f x)}{\sqrt{a+b \sec (e+f x)}} \, dx\)

Optimal. Leaf size=255 \[ -\frac{\cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} \text{EllipticF}\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right ),\frac{a+b}{a-b}\right )}{f \sqrt{a+b}}+\frac{b^2 \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt{a+b \sec (e+f x)}}-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{\cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right )}{f \sqrt{a+b}} \]

[Out]

(Cot[e + f*x]*EllipticE[ArcSin[Sqrt[a + b*Sec[e + f*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[e + f*
x]))/(a + b)]*Sqrt[-((b*(1 + Sec[e + f*x]))/(a - b))])/(Sqrt[a + b]*f) - (Cot[e + f*x]*EllipticF[ArcSin[Sqrt[a
 + b*Sec[e + f*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[e + f*x]))/(a + b)]*Sqrt[-((b*(1 + Sec[e +
f*x]))/(a - b))])/(Sqrt[a + b]*f) - Cot[e + f*x]/(f*Sqrt[a + b*Sec[e + f*x]]) + (b^2*Tan[e + f*x])/((a^2 - b^2
)*f*Sqrt[a + b*Sec[e + f*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.320415, antiderivative size = 255, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {3875, 3833, 21, 3829, 3832, 4004} \[ \frac{b^2 \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt{a+b \sec (e+f x)}}-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}-\frac{\cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right )}{f \sqrt{a+b}}+\frac{\cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right )}{f \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^2/Sqrt[a + b*Sec[e + f*x]],x]

[Out]

(Cot[e + f*x]*EllipticE[ArcSin[Sqrt[a + b*Sec[e + f*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[e + f*
x]))/(a + b)]*Sqrt[-((b*(1 + Sec[e + f*x]))/(a - b))])/(Sqrt[a + b]*f) - (Cot[e + f*x]*EllipticF[ArcSin[Sqrt[a
 + b*Sec[e + f*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[e + f*x]))/(a + b)]*Sqrt[-((b*(1 + Sec[e +
f*x]))/(a - b))])/(Sqrt[a + b]*f) - Cot[e + f*x]/(f*Sqrt[a + b*Sec[e + f*x]]) + (b^2*Tan[e + f*x])/((a^2 - b^2
)*f*Sqrt[a + b*Sec[e + f*x]])

Rule 3875

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)/cos[(e_.) + (f_.)*(x_)]^2, x_Symbol] :> Simp[(Tan[e + f*x]*(a
+ b*Csc[e + f*x])^m)/f, x] + Dist[b*m, Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e
, f, m}, x]

Rule 3833

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Simp[(b*Cot[e + f*x]*(a
 + b*Csc[e + f*x])^(m + 1))/(f*(m + 1)*(a^2 - b^2)), x] + Dist[1/((m + 1)*(a^2 - b^2)), Int[Csc[e + f*x]*(a +
b*Csc[e + f*x])^(m + 1)*(a*(m + 1) - b*(m + 2)*Csc[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^
2, 0] && LtQ[m, -1] && IntegerQ[2*m]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 3829

Int[csc[(e_.) + (f_.)*(x_)]*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[a - b, Int[Csc[e + f
*x]/Sqrt[a + b*Csc[e + f*x]], x], x] + Dist[b, Int[(Csc[e + f*x]*(1 + Csc[e + f*x]))/Sqrt[a + b*Csc[e + f*x]],
 x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]

Rule 3832

Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[(-2*Rt[a + b, 2]*Sqr
t[(b*(1 - Csc[e + f*x]))/(a + b)]*Sqrt[-((b*(1 + Csc[e + f*x]))/(a - b))]*EllipticF[ArcSin[Sqrt[a + b*Csc[e +
f*x]]/Rt[a + b, 2]], (a + b)/(a - b)])/(b*f*Cot[e + f*x]), x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]

Rule 4004

Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)
], x_Symbol] :> Simp[(-2*(A*b - a*B)*Rt[a + (b*B)/A, 2]*Sqrt[(b*(1 - Csc[e + f*x]))/(a + b)]*Sqrt[-((b*(1 + Cs
c[e + f*x]))/(a - b))]*EllipticE[ArcSin[Sqrt[a + b*Csc[e + f*x]]/Rt[a + (b*B)/A, 2]], (a*A + b*B)/(a*A - b*B)]
)/(b^2*f*Cot[e + f*x]), x] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[a^2 - b^2, 0] && EqQ[A^2 - B^2, 0]

Rubi steps

\begin{align*} \int \frac{\csc ^2(e+f x)}{\sqrt{a+b \sec (e+f x)}} \, dx &=-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}-\frac{1}{2} b \int \frac{\sec (e+f x)}{(a+b \sec (e+f x))^{3/2}} \, dx\\ &=-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt{a+b \sec (e+f x)}}+\frac{b \int \frac{\sec (e+f x) \left (-\frac{a}{2}-\frac{1}{2} b \sec (e+f x)\right )}{\sqrt{a+b \sec (e+f x)}} \, dx}{a^2-b^2}\\ &=-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt{a+b \sec (e+f x)}}-\frac{b \int \sec (e+f x) \sqrt{a+b \sec (e+f x)} \, dx}{2 \left (a^2-b^2\right )}\\ &=-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt{a+b \sec (e+f x)}}-\frac{b \int \frac{\sec (e+f x)}{\sqrt{a+b \sec (e+f x)}} \, dx}{2 (a+b)}-\frac{b^2 \int \frac{\sec (e+f x) (1+\sec (e+f x))}{\sqrt{a+b \sec (e+f x)}} \, dx}{2 \left (a^2-b^2\right )}\\ &=\frac{\cot (e+f x) E\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right ) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (1+\sec (e+f x))}{a-b}}}{\sqrt{a+b} f}-\frac{\cot (e+f x) F\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right ) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (1+\sec (e+f x))}{a-b}}}{\sqrt{a+b} f}-\frac{\cot (e+f x)}{f \sqrt{a+b \sec (e+f x)}}+\frac{b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt{a+b \sec (e+f x)}}\\ \end{align*}

Mathematica [A]  time = 7.60996, size = 259, normalized size = 1.02 \[ \frac{\sqrt{\sec (e+f x)} \left (\frac{b \left (-\frac{(a+b) \sqrt{\frac{a \cos (e+f x)+b}{(a+b) (\cos (e+f x)+1)}} \left (E\left (\sin ^{-1}\left (\tan \left (\frac{1}{2} (e+f x)\right )\right )|\frac{a-b}{a+b}\right )-\text{EllipticF}\left (\sin ^{-1}\left (\tan \left (\frac{1}{2} (e+f x)\right )\right ),\frac{a-b}{a+b}\right )\right )}{\sqrt{\frac{\cos (e+f x)}{\cos (e+f x)+1}}}-\tan \left (\frac{1}{2} (e+f x)\right ) (a \cos (e+f x)+b)\right )}{\left (b^2-a^2\right ) \sqrt{\sec ^2\left (\frac{1}{2} (e+f x)\right )} \sqrt{\cos ^2\left (\frac{1}{2} (e+f x)\right ) \sec (e+f x)}}+\frac{\csc (e+f x) (a \cos (e+f x)+b) (b \cos (e+f x)-a)}{\left (a^2-b^2\right ) \sqrt{\sec (e+f x)}}\right )}{f \sqrt{a+b \sec (e+f x)}} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Csc[e + f*x]^2/Sqrt[a + b*Sec[e + f*x]],x]

[Out]

(Sqrt[Sec[e + f*x]]*(((b + a*Cos[e + f*x])*(-a + b*Cos[e + f*x])*Csc[e + f*x])/((a^2 - b^2)*Sqrt[Sec[e + f*x]]
) + (b*(-(((a + b)*Sqrt[(b + a*Cos[e + f*x])/((a + b)*(1 + Cos[e + f*x]))]*(EllipticE[ArcSin[Tan[(e + f*x)/2]]
, (a - b)/(a + b)] - EllipticF[ArcSin[Tan[(e + f*x)/2]], (a - b)/(a + b)]))/Sqrt[Cos[e + f*x]/(1 + Cos[e + f*x
])]) - (b + a*Cos[e + f*x])*Tan[(e + f*x)/2]))/((-a^2 + b^2)*Sqrt[Sec[(e + f*x)/2]^2]*Sqrt[Cos[(e + f*x)/2]^2*
Sec[e + f*x]])))/(f*Sqrt[a + b*Sec[e + f*x]])

________________________________________________________________________________________

Maple [B]  time = 0.32, size = 852, normalized size = 3.3 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^2/(a+b*sec(f*x+e))^(1/2),x)

[Out]

-1/f/(a-b)/(a+b)*(-1+cos(f*x+e))^2*(cos(f*x+e)*EllipticE((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1/2))*(cos(
f*x+e)/(1+cos(f*x+e)))^(1/2)*(1/(a+b)*(a*cos(f*x+e)+b)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)*a*b+cos(f*x+e)*Ellipti
cE((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1/2))*b^2*(cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*(1/(a+b)*(a*cos(f*x+e
)+b)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)-cos(f*x+e)*EllipticF((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1/2))*(co
s(f*x+e)/(1+cos(f*x+e)))^(1/2)*(1/(a+b)*(a*cos(f*x+e)+b)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)*a*b-cos(f*x+e)*Ellip
ticF((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1/2))*b^2*(cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*(1/(a+b)*(a*cos(f*x
+e)+b)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)+(cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*(1/(a+b)*(a*cos(f*x+e)+b)/(1+cos(f*x
+e)))^(1/2)*EllipticE((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1/2))*a*b*sin(f*x+e)+(cos(f*x+e)/(1+cos(f*x+e)
))^(1/2)*(1/(a+b)*(a*cos(f*x+e)+b)/(1+cos(f*x+e)))^(1/2)*EllipticE((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1
/2))*b^2*sin(f*x+e)-EllipticF((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1/2))*(cos(f*x+e)/(1+cos(f*x+e)))^(1/2
)*(1/(a+b)*(a*cos(f*x+e)+b)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)*a*b-(cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*(1/(a+b)*(a
*cos(f*x+e)+b)/(1+cos(f*x+e)))^(1/2)*EllipticF((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1/2))*b^2*sin(f*x+e)+
a^2*cos(f*x+e)^2-cos(f*x+e)^2*a*b+a*b*cos(f*x+e)-b^2*cos(f*x+e))*(1+cos(f*x+e))^2*(1/cos(f*x+e)*(a*cos(f*x+e)+
b))^(1/2)/(a*cos(f*x+e)+b)/sin(f*x+e)^5

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc \left (f x + e\right )^{2}}{\sqrt{b \sec \left (f x + e\right ) + a}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2/(a+b*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(csc(f*x + e)^2/sqrt(b*sec(f*x + e) + a), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\csc \left (f x + e\right )^{2}}{\sqrt{b \sec \left (f x + e\right ) + a}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2/(a+b*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

integral(csc(f*x + e)^2/sqrt(b*sec(f*x + e) + a), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{2}{\left (e + f x \right )}}{\sqrt{a + b \sec{\left (e + f x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**2/(a+b*sec(f*x+e))**(1/2),x)

[Out]

Integral(csc(e + f*x)**2/sqrt(a + b*sec(e + f*x)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc \left (f x + e\right )^{2}}{\sqrt{b \sec \left (f x + e\right ) + a}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2/(a+b*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate(csc(f*x + e)^2/sqrt(b*sec(f*x + e) + a), x)